feat(gc): add gc history subcommand#1030
Open
gcharpe1604 wants to merge 1 commit into
Open
Conversation
Signed-off-by: Govind Charpe <govind.charpe16@gmail.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1030 +/- ##
=========================================
- Coverage 10.99% 9.42% -1.57%
=========================================
Files 173 325 +152
Lines 8671 16186 +7515
=========================================
+ Hits 953 1525 +572
- Misses 7612 14526 +6914
- Partials 106 135 +29 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #1017
This PR adds the
harbor gc historysubcommand. The original GC implementation has been split into smaller PRs following maintainer feedback.🛠️ File Changes Breakdown
1. Core Feature Implementation (Manual Changes)
cmd/harbor/root/cmd.go: Registered the newgcparent command under the "System" group (and sorted imports alphabetically to pass formatting checks).cmd/harbor/root/gc/cmd.go: Defined the parentgccommand skeleton, registering only thehistorysubcommand.cmd/harbor/root/gc/history.go: Implemented CLI execution logic, output rendering config, and pagination/filtering options for the history command.cmd/harbor/root/gc/gc_test.go: Added command tests to validate pagination flags and error boundaries.pkg/api/gc_handler.go: Added theListGCHistoryhandler leveraging the existing Harbor Go SDK client.pkg/views/gc/list/view.go: Implemented the Bubble Tea table view for GC history list output, sorting the parameter columns alphabetically to prevent nondeterministic rendering of Go maps.2. Auto-Generated Documentation
These files were generated by running
go run doc.goandgo run man-docs/man_doc.gofrom thedocdirectory to keep reference materials in sync:doc/cli-docs/harbor.md&doc/man-docs/man1/harbor.1(updated withgcsubcommand entries)doc/cli-docs/harbor-gc.md&doc/cli-docs/harbor-gc-history.mddoc/man-docs/man1/harbor-gc.1&doc/man-docs/man1/harbor-gc-history.1